//
// Created by 123 on 2025/1/9.
//
#include "iostream"
#include "map"
using namespace std;

class MyCompare{
public:
    bool operator()(int v1,int v2) const{
        return v1>v2;
    }
};

void test(){
    map<int,int,MyCompare> m1;
    m1.insert(make_pair(1,10));
    m1.insert(make_pair(2,20));
    m1.insert(make_pair(3,30));

    for(map<int,int,MyCompare>::iterator it=m1.begin();it != m1.end();it++){
        cout << "key=" << it->first << " value=" << it->second << endl;
    }
}

int main143(){
    test();
    return 0;
}